package com.sskj.uboex.presenter;

import com.lzy.okrx2.adapter.FlowableBody;
import com.sskj.common.base.HttpData;
import com.sskj.lib.bean.PageBean;
import com.sskj.lib.http.JsonConverter;
import com.sskj.uboex.bean.NoticeList;
import com.sskj.uboex.ui.activity.MsgActivity;

import java.util.List;

import io.reactivex.Flowable;


public class MsgActivityPresenter extends BasePresenter<MsgActivity> {

    public Flowable<List<NoticeList>> getData(String page, String pageSize) {
         return httpService.getGGList(page, pageSize)
                .converter(new JsonConverter<HttpData<PageBean<NoticeList>>>() {
                })
                .adapt(new FlowableBody<>())
                .map(pageBeanHttpData -> pageBeanHttpData.getData().getList());

    }
}
